<?php
/**
 * @desc 站点数据层
 * @author kevin.wang
 * @date 2015-01-01 12:00:00
 */
class Site extends Base{
	//数据表
	protected $table = 'pert_adver';
	//获取系统信息
	public function getSysInfo(){
		$sys_info = array();
		$sys_info['os']            = PHP_OS;
		$sys_info['ip']            = $_SERVER['SERVER_ADDR'];
		$sys_info['web_server']    = $_SERVER['SERVER_SOFTWARE'];
		$sys_info['php_ver']       = PHP_VERSION;
		$sys_info['timezone']      = date_default_timezone_get();
		$sys_info['max_filesize'] = ini_get('upload_max_filesize');
		$sys_info['mysql_verion'] = $this->getMysqlVersion();
		return $sys_info;
	}
	//获取数据库版本
	public function getMysqlVersion(){
		$sql = "select version() as version";
		return $this->select_table($sql, array(),Base::QUERY_RAW);
	}
}
